/**
 * @author scylla
 * @version V1.0
 * @Project echo-java-base
 * @Title 练习1
 * @Description *
 * @Package concurrent.mthread.liftoff
 * @Since 2021/7/26 5:11 下午
 */
package concurrent.mthread.liftoff;

import java.text.MessageFormat;

public class P1 implements Runnable {

    public P1() {
        System.out.println("初始化...");
    }


    @Override
    public void run() {
        for (int i = 0; i < 3; i++) {
            System.out.println(MessageFormat.format("来自{0}的消息: 有内鬼，终止交易", Thread.currentThread().getName()));
            Thread.yield();
        }
        System.out.println("交易终止!");
    }
}
